#
study_name = 'study_dev'
#
import numpy as np
#
if __name__ == '__main__':
    source_python = r'\\MA-CASTRO\abaqus-conecyl-python'
    import sys
    import os
    study_dir  = os.path.join( r'C:\Temp','abaqus',study_name )
    if not os.path.isdir( study_dir ):
        os.makedirs( study_dir )
    python_dir = os.path.join( study_dir, 'abaqus-conecyl-python' )
    output_dir = os.path.join( study_dir,'outputs' )
    print 'configuring folders...'
    print '\t' + python_dir
    print '\t' + output_dir
    if not os.path.isdir( output_dir ):
        os.makedirs( output_dir )
    if not os.path.isdir( python_dir ):
        os.makedirs( python_dir )
    os.system('copy ' + source_python + ' ' + python_dir + '') 
    sys.path.append( python_dir )
    #
    import study
    study = reload( study )
    from study import Study
    std = Study()
    std.name = study_name
    std.rebuild()
    cname = 'r_100_h_200'
    pload = 20.

    import conecyl
    conecyl = reload( conecyl )
    cc3 = conecyl.ConeCyl()
    cc3.jobname = 'check_ABD_only'
    laminaprop = (230.e3,6.6e3,0.25,4.8e3,4.8e3,4.8e3,273.15)
    laminaprop = (135.e3,13.e3,0.38,6.4e3,6.4e3,4.3e3,273.15)
    cc3.laminaprop = laminaprop
    cc3.stack = [45,-45,90,0,0,90,-45,45]*2
    cc3.plyt = 0.5
    cc3.plyt = 0.142
    cc3.using_lam_parameters = True
    cc3.rebuild()
    print cc3.laminate_obj.A
    print cc3.laminate_obj.B
    print cc3.laminate_obj.D
    print cc3.laminate_obj.E
